package network

import (
	"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
)

type CloudNetworkInterface interface {
	VpcGreeter
	SubnetGreeter
	NATGreeter
	EIPGreeter
	RouteGreeter
	VpnGreeter
	CLBGreeter
	DNSGreeter
}

type Network struct {
	credential *common.Credential
}

func NewNetwork(credential *common.Credential) CloudNetworkInterface {
	return &Network{
		credential: credential,
	}
}

func (n *Network) VPC(region string) VpcInterface {
	return newVpc(n, region)
}

func (n *Network) Subnets(region string) SubnetInterface {
	return newSubnet(n, region)

}

func (n *Network) NAT(region string) NATInterface {
	return newNAT(n, region)
}

func (n *Network) Routes(region string) RouteInterface {
	return newRoute(n, region)

}

func (n *Network) VPN(region string) VpnInterface {
	return newVpn(n, region)
}

func (n *Network) EIP(region string) EIPInterface {
	return newEIP(n, region)
}

func (n *Network) CLB(region string) CLBInterface {
	return newCLB(n, region)
}

func (n *Network) DNS() DNSInterface {
	return newDNS(n)
}

func (n *Network) Credential() *common.Credential {
	return n.credential
}
